package com.hnhy.hnhyscms_ws.service.impl;

import com.hnhy.hnhyscms_ws.dao.ICustomersDao;
import com.hnhy.hnhyscms_ws.entity.Customers;
import com.hnhy.hnhyscms_ws.service.ICustomersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomersService implements ICustomersService {
    @Autowired
    private ICustomersDao iCustomersDao;

    @Override
    public List<Customers> getAllCustomers() {
        return iCustomersDao.getAllCustomers();
    }

    @Override
    public Customers getByCustomerNo(String customerNo) {
        return iCustomersDao.getByCustomerNo(customerNo);
    }

    @Override
    public void deleteCustomers(String customerNo) {
        iCustomersDao.deleteCustomers(customerNo);
    }

    @Override
    public void changeByCustomerNo(Customers Customers) {
        iCustomersDao.changeByCustomerNo(Customers);
    }

    @Override
    public void addCustomers(Customers customers) { iCustomersDao.addCustomers(customers); }

    @Override
    public Customers findMaxId() { return iCustomersDao.findMaxId(); }
}
